package com.xiaoxi.bms.common.constant.enumeration.statuscode.user;


import com.xiaoxi.bms.common.constant.enumeration.statuscode.ParentEnum;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xiaoxi
 * @version 1.0
 * @date 2022/6/2 14:12
 */
public enum MenuUserEnums implements ParentEnum {

    THE_URI_WILL_PASS("A080","路由访问链接uri必传"),
    THE_COMPONENT_WILL_PASS("A081","路由对应的组件位置component必传"),
    THE_PARENT_NODE_DOES_NOT_EXIST("A082","父节点不存在"),
    THE_ROUTE_NAME_ALREADY_EXISTS("A083","路由名称已存在"),
    MENU_ID_NOT_EXIST("A084","菜单编号不存在"),
    THE_TITLE_NAME_ALREADY_EXISTS("A085","菜单名称已存在");

    private final String code;
    private final String message;

    MenuUserEnums(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }


    @Override
    public Map<String, String> format() {
        Map<String, String> enumData = new HashMap<>();
        enumData.put("code", this.code);
        enumData.put("message", this.message);
        return enumData;
    }
}
